const http = uni.$u.http

// 登录
export const login = (params, config = {}) => http.post('/appUser/login', params, config)

// 选择用餐人数
export const chosePersonNum = (params, config = {}) => http.post('/hjcy/desk/appUser/chosePersonNum', params, config)

// 用户端点击开始点餐修改桌位状态为占用
export const occupyDesk = (params, config = {}) => http.post(`/hjcy/desk/appUser/occupyDesk/${params.id}`, params,
	config)

// 用户端获取分类菜单列表
export const getCategoryList = (data) => http.get('/hjcy/category/appUser/getCategoryList', data)

// 用户端获取分类菜单列表
export const getCategoryDish = (data) => http.get(
	`/hjcy/dish/appUser/getCategoryDish/${data.categoryId}?deskId=${data.deskId}`, data)

// 用户端获取分类菜单列表
export const getInfoById = (data) => http.get(`/hjcy/dish/appUser/getInfoById/${data.id}`, data)

// 用户端添加下单菜品
export const addDish = (params, config = {}) => http.post('/hjcy/orderDish/appUser/addDish', params, config)

// 用户端去除下单菜品
export const deleteDish = (data) => http.delete(`/hjcy/orderDish/appUser/deleteDish/${data.id}`)

// 用户端查看桌位添加菜品列表
export const getDishInfoList = (data) => http.get(`/hjcy/orderDish/appUser/getDishInfoList/${data.deskId}`)

// 用户端查看桌位添加菜品列表
export const getOrderDetailListInfo = (data) => http.get(
	`/hjcy/orderDetail/appUser/getOrderDetailListInfo/${data.deskId}`)

// 用户端获取当前桌位锅底信息
export const getSoupInfo = (data) => http.get(`/hjcy/orderDish/appUser/getSoupInfo/${data.deskId}`)

// 用户端根据桌位号展示购物车
export const getShoppingInfo = (data) => http.get('/hjcy/orderDish/appUser/getShoppingInfo', data)

// 用户端下单接口
export const placeAnOrder = (params, config = {}) => http.post('/hjcy/orderDetail/appUser/placeAnOrder', params, config)


// 用户端呼叫服务员
export const SendMessage = (params, config = {}) => http.post('/hjcy/desk/userSendMessage', params, config)


// 用户端添加下单菜品
export const CategoryAddDish = (params, config = {}) => http.post('/hjcy/orderDish/appUser/CategoryAddDish', params, config)

// 用户端查询自己的状态
export const getDeskStatus = (data) => http.get('/hjcy/desk/getDeskStatus', data)

// 获取版本号
export const getLastVersion = (data) => http.get('/hjcy/version/getLastVersion?type='+data.type, data)

// 获取整个版本号
// export const getLastVersionList = (data) => http.get(`/hjcy/version/list/`, data)